<?
/*  The Admin layout
 *  The following templates are required for admin:
 */
$BlockMenu = $this->renderTemplate('BlockMenu', 'Tasklist');
$BlockUserInfo = $this->renderTemplate('BlockUserInfo', 'Users');
/*
 *  The following templates are module-dependent and may be missing:
 */
try {
    $BlockModuleMenu = $this->renderTemplate('ModuleMenu');
} catch (\Yz_Exception $ex) {
    $BlockModuleMenu = '<!-- No ModuleMenu -->';
}
$ModuleTitle = $this->translate('#Module');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="<?= $var_YzLanguage?>" dir="ltr">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title><?= $this->title ?> :: <?= $ModuleTitle ?></title>
        <?= $this->renderMeta() ?>
        <meta http-equiv="X-UA-Compatible" content="IE=8"/>
        <link rel="shortcut icon" href="<?= $var_webRoot ?>www/Yz/images/logo-16x16.png" type="image/png" />
        <link rel="stylesheet" href="<?= $var_webRoot ?>www/Yz/styles/admin.css" type="text/css" />
        <?= $this->renderCSS() ?>

        <script type='text/javascript'  src='<?= $var_webRoot ?>www/Yz/js/Yz.js'>/* Required Javascript */</script>
        <?= $this->renderJS() ?>

    </head>
    <body>
        <div class="yz-admin-top">
            <div class="yz-logo"><a href="<?= $var_webPrefix ?>" title="<?= $this->translate('Index') ?>"></a></div>
            <?= $BlockUserInfo ?>
        </div>
        <!-- left menu -->
        <div class="yz-admin-left-menu">
            <div>
                <?= $BlockMenu ?>
            </div>
            <div>
                <?// $BlockModulesList ?>
            </div>
        </div>
        <!-- / left menu -->
        <!-- right menu -->
        <div class="yz-admin-menu-actions"
                onmouseover="$(this).find('.yz-menu-content').show()"
                onmouseout="$(this).find('.yz-menu-content').hide()"
            >
            <?= $BlockModuleMenu ?>
        </div>
        <!-- /right menu -->
        <!-- content -->
        <div class="yz-admin-content">
            <?
            /*  output headers: h1 and h2
             *  if $var_H* is set, use it as H*, unless it evaluates to empty string
             */
            isset($var_H2)
                or $var_H2 = $ModuleTitle;
            isset($var_H1)
                or $var_H1 = $this->title;
            if ($var_H2) {
                ?>
            <h2><?= $var_H2 ?></h2>
                <?
            }
            if ($var_H1) {
                ?>
            <h1><?= $var_H1 ?></h1>
                <?
            }
            print $this->content;
            ?>
        </div>
        <div class="yz-admin-bottom">
            <div>&copy; 2006-2012 YZ Ltd.</div>
        </div>
    </body>
</html>
